import Component from 'vue-class-component';
import BaseListTabLayoutApp from '@/lib/base/BaseListTabLayoutApp';

@Component
class WebApp extends BaseListTabLayoutApp {

    public render() {
        const items = this.getList().map((item, index) => {
            return <p >THIS IS WEB DEMO PAGE {index}</p>
        });
        return (
            <div class="app" >
                {this.renderListView({
                    content: items,
                })}
            </div>
        )
    }

    public apiready() {
        // apicloud引擎加载完成调用方法
        this.setRefreshHeaderInfo();
        this.refresh();
    }

    public request() {
        return new Promise<any>((res) => {
            setTimeout(() => {
                res({ code: 200, data: [1, 2, 3, 4, 5], msg: '' });
            }, 3000);
        });
    }
}


